<?php global $options; ?>

<?php include TEMPLATEPATH.'/languages/'.$options['language']; ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $options['text_direction']; ?>" lang="<?php bloginfo('language'); ?>" xml:lang="<?php bloginfo('language'); ?>">

<head profile="http://gmpg.org/xfn/11">



<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<title><?php seotitles(); ?></title>



<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />



<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scripts/jquery-1.3.1.min.js"></script>

<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scripts/common.js"></script>

<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scripts/mediaplayer/swfobject.js"></script>

<script type="text/javascript">

$(document).ready(function() {



// Layout options feature

$('a#options').click(function (){

	if (($('.layout_options')).is(':hidden')) {

	$('#wrapper').fadeTo('fast', 0.33);

	$('.layout_options').fadeIn('normal');

	} else {

	$('#wrapper').fadeTo('fast', 1.0);

	$('.layout_options').fadeOut('normal');

	}

});



$('.cancel a').click(function() {

	$('#wrapper').fadeTo('fast', 1.0);

	$('.layout_options').fadeOut('normal');

});



$('a#reset').click(function() {

$('.cat-widget').each( function() {$.cookie($(this).attr('id'), null, { path: '/', expires: 100 }); $(this).show()});

$('.box_a').each( function() {$.cookie($(this).attr('id'), null, { path: '/', expires: 100 }); $(this).show()});

$('.widgets li').each (function() {$.cookie($(this).attr('id'), null, { path: '/', expires: 100 }); $(this).show()});

$('.layout_options').fadeOut('normal');

$('#wrapper').fadeTo('fast', 1.0);

});

// done.



// Drop Down Menu (2 Levels)

$('#menu ul ul').hide(0.000000000000000000000000000000000000001);

$('#menu ul li a').addClass('nav_parent');

$('#menu ul ul a').removeClass('nav_parent');

$('#menu ul ul a').addClass('nav_child');



$('.nav_parent').bind('mouseenter', function() {

	if (($(this).next().is('ul')) && ($(this).next().is(':visible'))) {

	return false;

	} else if (($(this).next().is('ul')) && ($(this).next().is(':hidden'))) {

	$(this).next().show();

	return false;

	}

});



$('.nav_parent').parent().bind('mouseleave', function() {

	$('#menu ul ul:visible').hide();

});

// End of Menu



/* various widget actions */

$('.minimize').click(function() {

	$(this).parent('h3').next('.container').toggle();

});



$('.Sminimize').click(function() {

	$(this).parent('h2').next().toggle();

});



$('.Wminimize').click(function() {

	$(this).parent('h2').next().toggle();

});



$('.close').click(function() {

	$(this).parent('h3').parent('.cat-widget').fadeOut('slow');

	$.cookie($(this).parent('h3').parent('.cat-widget').attr('id'), 'closed', { path: '/', expires: 100 });

	return false;

});



$('.Sclose').click(function() {

	$(this).parent('h2').parent().fadeOut('slow');

	$.cookie($(this).parent('h2').parent('.box_a').attr('id'), 'closed', { path: '/', expires: 100 });

	return false;

});



$('.Wclose').click(function() {

	$(this).parent('h2').parent().fadeOut('slow');

	$.cookie($(this).parent('h2').parent('li').attr('id'), 'closed', { path: '/', expires: 100 });

	return false;

});



$('.cat-widget').each( function() {

	var cat_ID = $(this).attr('id');

	if ($.cookie(cat_ID) == 'closed') $(this).hide();

});



$('.box_a').each( function() {

	var box_ID = $(this).attr('id');

	if ($.cookie(box_ID) == 'closed') $(this).hide();

});



$('.widgets li').each (function() {

	var sidebar_ID = $(this).attr('id');

	if ($.cookie(sidebar_ID) == 'closed') $(this).hide();

});



/* control visible stories */

$('ul.more_stories').each(function(index) {

$(this).children('li').slice(3).hide();

});



$('.minus').click(function() {

$(this).parent().next('ul').children('li:visible:last').hide();

});



$('.plus').click(function() {

$(this).parent().next('ul').children('li:hidden:first').show();

});



/* clear form */

clearInput('#feedemail');



$('.videothumb').bind('mouseenter', function() {

$(this).children('.playit').children('a').fadeTo('fast', 0.50);

$(this).children('.playit').children('a').show();

return false;

});



$('.videothumb').bind('mouseleave', function() {

$(this).children('.playit').children('a').hide();

return false;

});



});

</script>



<?php

if ($options['loading'] == 1) :



print '<script type="text/javascript">

function preloader(){
document.getElementById("preloader").style.display = "none";

document.getElementById("container").style.display = "block";

}

window.onload = preloader;

</script>



<style type="text/css">

div[id="container"]{

	display: none;

}



div[id="preloader"]{

	position: absolute;

	z-index: 1000;

	width: 100%;

	height: 100%;

	background: url('.get_bloginfo('template_directory').'/styles/'.$options['style'].'/img/loading.gif) no-repeat 20px 20px;

	cursor: wait;

}

</style>';



endif;

?>



<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>

<?php wp_head(); ?>



</head>

<body>



<?php if ($options['loading'] == 1) : ?><div id="preloader"></div><?php endif; ?>

<?php if ($options['loading'] == 1) : ?><div id="container"><?php endif; ?>



<?php if($options['loptions'] == true) : ?>

<div class="layout_options">

<div class="cancel"><a href="#"></a></div><div class="clear"></div>

<p><?php print RESET_LAYOUT; ?></p>

<a href="#resetLayout" id="reset"><?php print RESET; ?></a>

</div>

<?php endif; ?>



<div id="wrapper">



<div id="header">



	<div id="date"><?php print __(date('j F Y')); ?></div>

	

	<div id="topnav">

	<!--<ul>

	<li class="left"></li>

	<li><a href="<?php bloginfo('url'); ?>"><?php print NAV_HOME; ?></a></li>

	<?php  

		/**

		 * Modifica delle voci dei menu, da categorie a pagine e viceversa.

		 * Enrico, 25.05

		 */

	?>

	

	<?php //wp_list_pages('sort_column=menu_order&depth=0&title_li='); ?>

	<li class="feed"><a href="<?php bloginfo('rss2_url'); ?>"><?php print RSS_FEED; ?></a></li>

	<li class="right"></li>

	</ul>

	</div><div class="clear">-->

    

    	<ul>

       	<li class="left"></li>

        

		<?php  

		/**

		 * Esclusione delle voci delle categoie da Topnav.

		 * men� statico

		 * Agata, 30.05

		 */

		?>



<!--	<li<?php if(!is_category() && !is_page()) { ?> class="current-cat"<?php } ?>><a href="<?php bloginfo('home'); ?>/" title="Home"><?php print NAV_HOME; ?></a></li>

-->	



	<?php //wp_list_categories('orderby=ID&order=ASC&depth=2&hide_empty=0&title_li=&exclude='.$options['excluded']); ?>

    

    <li><a href="#" title="#">Spazi pubblicitari</a></li>

    <li><a href="#" title="#">Contatti</a></li>

   <!-- <li><a href="#" title="#">Login</a></li>  --> 

   	<li class="feed"><a href="<?php bloginfo('rss2_url'); ?>"><?php print RSS_FEED; ?></a></li>

	<li class="right"></li>



    

	</ul>



    

    </div>

	

	<?php if ($options['logo'] == true) : ?>

	<a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>" id="logo"><img src="<?php bloginfo('template_directory'); ?>/styles/<?php echo $options['style']; ?>/img/logo.png" alt="" /></a>

	<?php else : ?>

	<div class="blogheader">

	<h1><a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>

	<span class="description"><?php bloginfo('description'); ?></span>

	</div>

	<?php endif; ?>

	

	<?php if($options['loptions'] == true) : ?>

	<a href="#showOptions" title="Layout Options" id="options"></a>

	<?php endif; ?>

	

	<?php if (!empty($options['adblock1'])) : ?>

	<div id="ad468"><?php print $options['adblock1']; ?></div>

	<?php endif; ?>

	

</div>



<div id="menu">



	<ul>

	<li class="left"></li>

	<li><a href="<?php bloginfo('url'); ?>"><?php print NAV_HOME; ?></a></li>

	<?php  

		/**

		 * Modifica delle voci dei menu, da categorie a pagine e viceversa.

		 * Enrico, 25.05

		 * esclusione della pagina Contatti dal men� principale

		 * Agata, 6.06.09

		 */

	?>

	

	<?php wp_list_pages('sort_column=menu_order&depth=0&title_li=&exclude=90,277,272,269'); ?>

<!--	<li class="feed"><a href="<?php bloginfo('rss2_url'); ?>"><?php print RSS_FEED; ?></a></li>

-->	<li class="right"></li>

	</ul>

<form class="searchform" method="get" action="<?php bloginfo('url'); ?>/">

		<fieldset>

			<input type="text" value="<?php the_search_query(); ?>" name="s" class="searchfield" />

			<input type="submit" value="" class="searchbutton" />

		</fieldset>

	</form>	

    </div><div class="clear">

    



<!--	<ul>

	<li<?php if(!is_category() && !is_page()) { ?> class="current-cat"<?php } ?>><a href="<?php bloginfo('home'); ?>/" title="Home"><?php print NAV_HOME; ?></a></li>

	<?php wp_list_categories('orderby=ID&order=ASC&depth=2&hide_empty=0&title_li=&exclude='.$options['excluded']); ?>

	</ul>

-->

	



	<div class="clear"></div>



</div>